<div class="main-width">
	<div class="block-content">
		<div class="left-box"></div>
		<div>
			<div class="main-boxcont">
				<?$this->load->view('muachung/product/image');?>
			</div>
		</div>
		<div class="c"></div>
	</div>
</div>

<div class="main_content">
	<div class="main">
		<div class="block-content">
			<div class="c"></div>
		</div>
	</div>
	<div class="">
		<?
		$i = 0;
		foreach ($catalogues1 as $catalogue) {
			if (count($catalogue->products) < 1)
				continue;
			$i++;
			?>
			<div align="center" class="weekly <?= $i % 2 == 1 ? 'weekly2' : '' ?>">
				<div class="homecate_c">
					<div style="z-index: 10" id="scrollbox<?= $catalogue->id ?>">
						<div id="dockCat<?= $catalogue->id ?>" class="v6TitleCate">
							<h2 class="fl"><?= $catalogue->name ?></h2>
							<div class="fl link">
								<a class="fl v7linkcate" href="<?= url_create('site', 'ViewCatalogue', 'index', $catalogue->id) ?>"><?= lang('more') ?></a>
							</div>
							<div class="c"></div>
						</div>
						<div class="c"></div>
					</div>
					<? if (count($catalogue->products) > 4) { ?>
						<div id="v6PreCatePage<?= $catalogue->id ?>" class="v6PreCatePage hidden" style="left: -45px;">
							<a href="javascript:void(0)" class="link_block"></a>
						</div>
						<div id="v6NextCatePage<?= $catalogue->id ?>" class="v6NextCatePage" style="right: -45px;">
							<a href="javascript:void(0)" class="link_block"></a>
						</div>
					<? } ?>
					<div class="v6ContentCate pTop5">
						<?if($catalogue->remaining_product>0){?>
						<a id="v7Bgnew<?= $catalogue->id ?>" href="<?= url_create('site', 'ViewCatalogue', 'index', $catalogue->id) ?>" class="v7Bgnew hidden" style="width: 251px; right: -23px;">
							<span class="v7inview"><?= lang('view_more') ?></span><br>
							<span class="v7productnum"><?= lang('remaining_product',$catalogue->remaining_product) ?></span>
						</a>
						<?}?>
						<div class="v6CatePage">
							<div class="jCarouselNew jcarousel-container jcarousel-container-horizontal" id="jCarouselNew<?= $catalogue->id ?>" style="position: relative; display: block;">
								<div class="jcarousel-clip jcarousel-clip-horizontal" style="position: absolute;">
									<ul class="listHomeCate jcarousel-list jcarousel-list-horizontal" style="overflow: hidden; position: absolute; top: 0px; margin: 0px; padding: 0px; left: 0px; width: 2378px;">
										<? foreach ($catalogue->products as $product) { ?>
											<li style="float: left; list-style: none outside none;" class="v6Item jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-1-horizontal" jcarouselindex="1">
												<div class="v6ItemCon">
													<div class="v6ItemContent">
														<div lang="<?= $catalogue->id ?><?= $product->id ?>" class="v6ItemImg">
		<!--															<div id="itemMoreDetail<?= $catalogue->id ?><?= $product->id ?>" class="v6ItemHover hidden" style="display: none;">
																<a href="<?= url_create('site', 'ViewProduct', 'index', $product->id) ?>" class="v6ImageHover">
																	<div align="center" class="v6ItemHoverText"></div>
																	<div class="v6ItemHoverTextT">
																		Vui long xem tren website
																	</div>
																</a>
																<div class="v6ItemHoverButton">
																	<div align="center">
																		<a href="javascript:void(0)"  class="v7BtnLike fixPNG"><img width="91" height="30" alt="Đánh dấu" class="fixPNG" src="style/images/blank.gif"></a>
																	</div>
																</div>
															</div>-->
															<a href="<?= url_create('site', 'ViewProduct', 'index', $product->id) ?>">
																<div class="v7price_promotionsmall"><?=$product->save?><span>%</span></div>
																<img width="217" height="217" src="<?= image_url($product->thumb) ?>" id="itemImages<?= $catalogue->id ?><?= $product->id ?>">
															</a>
															<!--															<div class="v7InfoType v7BottomBuy">
																															<div align="center" class="fl v7SetHotSmall ">BÁN CHẠY</div>
																															<div class="c"></div>
																														</div>-->
														</div>
														<div align="left" class="v6ItemTitle">
															<div><a title="Xem chi tiết deal" href="<?= url_create('site', 'ViewProduct', 'index', $product->id) ?>"><?= $product->name ?></a>  &nbsp; <!-- Chu thich --></div>
														</div>
														<div class="v6ItemPrice">
															<div class="fl pTop5 v7price">
																<div class="v7PromotionSmall"><?=  currency_format($product->sale_price)?><span>đ</span></div>
																<div class="v7bnew f12"><?=lang('total_orders')?>: <b><?=$product->total_orders?></b></div>
															</div>
															<div style="color: #555" class="v7typeproduct fl v7proTypeSmall"><?=$product->voucher==1?lang('voucher'):''?></div>
															<a class="v7viewSmall fr fixPNG" href="<?= url_create('site', 'ViewProduct', 'index', $product->id) ?>"><img width="39" height="30" src="style/images/blank.gif"></a>
															<div class="c"></div>	
														</div>
													</div>
												</div>
											</li>
										<? } ?>
									</ul></div>
								<div class="c"></div>
							</div></div>
					</div>
				</div>
				<div class="c"></div>
			</div>
			
		<? } ?>
	</div>
</div>
